package com.bootcamp.jacase.lambda;

import java.sql.SQLOutput;

/**
 * @program: LambdaCode
 * @description:
 * @author: Keyu Li
 * @create: 2021-09-04 14:42
 **/

public class TestGetClass {
    public static void main(String[] args) {
        A aa = new A();
        B bb = new B();
        A ab = new B();
        System.out.println("aa==bb? "+(aa.getClass()==bb.getClass()));
        System.out.println("aa==ab? "+(aa.getClass()==ab.getClass()));
        System.out.println("bb==ab? "+(bb.getClass()==ab.getClass()));
    }
}

class A {
    void show() {
        System.out.println("father class A!");
    }
}

class B extends A {
    @Override
    void show() {
        System.out.println("son calss B!");
        ;
    }
}
